﻿using Model.Models;
using ModelDto;
using System;
using System.Collections.Generic;
using System.Text;

namespace IService
{
    public interface ILogService
    {
        /// <summary>
        /// 写登录日志
        /// </summary>
        /// <param name="account"></param>
        /// <param name="AccountNo"></param>
        /// <param name="Pwd"></param>
        /// <param name="LoginState"></param>
        /// <param name="LoginAction"></param>
        public void WriteLoginLog(Account account, string AccountNo, string Pwd, string LoginState, string LoginAction);

        /// <summary>
        /// 写错误日志
        /// </summary>
        /// <param name="account"></param>
        /// <param name="Message"></param>
        /// <param name="StackTrace"></param>
        public void WriteErrorLog(Account account, string RequestPath, string Message, string StackTrace);

        /// <summary>
        /// 写BPM推送日志
        /// </summary>
        /// <param name="account"></param>
        /// <param name="PushUrl"></param>
        /// <param name="PushContent"></param>
        /// <param name="ResponseContent"></param>
        /// <param name="RequestTime"></param>
        public void WriteApiLog(Account account, string PushUrl, string PushContent, string ResponseContent, string RequestTime, string State);

        /// <summary>
        /// 获取登录日志
        /// </summary>
        /// <param name="request"></param>
        /// <param name="count"></param>
        /// <returns></returns>
        public Task<(List<LoginLog>,int)>  GetLoginLogList(LogRequest request);

        /// <summary>
        /// 获取错误日志
        /// </summary>
        /// <param name="request"></param>
        /// <param name="count"></param>
        /// <returns></returns>
        public Task<(List<ErrorLog>, int)> GetErrorLogList(LogRequest requestt);

        /// <summary>
        /// 获取BPM推送日志
        /// </summary>
        /// <param name="request"></param>
        /// <param name="count"></param>
        /// <returns></returns>
        public Task<(List<ApiLog>, int)> GetApiLogList(LogRequest request);
    }
}
